import {requestApi} from '../util/network'
// 获取手机验证码
export const getSmsCaptcha =
    (type, phone) =>
        requestApi(
            '/Connect/get_sms_captcha',
            'GET',
            {
                'type': type,
                'phone': phone
            }
        )
// 验证码检测
export const checkPictureCaptcha =
    (captcha) =>
        requestApi(
            '/Seccode/check',
            'POST',
            {
                'captcha': captcha
            }
        )
//微信js分享的配置信息
export const getWechatShare =
    (url) =>
        requestApi(
            '/index/getWechatShare',
            'POST',
            {
                'url': url
            }
        )
//分享信息
export const getShareInfo =
    (type, sign ,key) =>
        requestApi(
            '/Share/share_info',
            'POST',
            {
                type, // 分享类型 1:商品/2:店铺
                sign, // 分享ID 商品或店铺ID
                key,
                is_app: 'wap', // 分享机型 1:ios/2:android/3:wap
            },
            'member'
        );

//静默授权
export const baseLogin=
    (ref) =>
        requestApi(
            '/Wxauto/base_login',
            'POST',
            {
                ref,//跳转链接
            },
        );
